package com.pactera.madp.cp.mapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pactera.madp.cp.api.entity.WorkContactRoomEntity;
import com.pactera.madp.cp.api.model.transfer.GetContactRoom;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface WorkContactRoomMapper extends BaseMapper<WorkContactRoomEntity> {

    List<GetContactRoom> getContactRoomList(@Param("contactIds") List<Integer> contactIds, @Param("roomIds") List<String> roomIds);

    List<WorkContactRoomEntity> getWorkContactRoomIndex(Map<String, Object> map);

    @SqlParser(filter = true)
    Integer updateWorkContactRoomByIds(WorkContactRoomEntity workContactRoomEntity);

    List<WorkContactRoomEntity> getWorkContactRoomsByRoomId(Map<String, Object> map);

    Integer selectByRoomIds(@Param("roomIds") List<Integer> roomIds);

    Integer selectDisId(@Param("roomIds") List<Integer> roomIds);

    Integer getStatistic(String toString, List<Object> roomIds);

    Integer getRoomContactTodayLossCount(@Param("roomIds") List<Integer> roomIds, @Param("startTime") String startTime,@Param("endTime") String endTime);

    Integer getTodayJoinRoomCount(@Param("roomIds") List<Integer> roomIds, @Param("startTime") String startTime,@Param("endTime") String endTime,@Param("type") Integer type);

    Integer getTodayOutRoomCount(@Param("roomIds") List<Integer> roomIds, @Param("startTime") String startTime,@Param("endTime") String endTime,@Param("type") Integer type);

}
